package com.lagou.模块四;

import java.util.concurrent.locks.ReentrantLock;

public class ReturnThread extends Thread{
    private TicketPool ticketPool;
    ReturnThread(TicketPool ticketPool){this.ticketPool = ticketPool;}
    @Override
    public void run(){
        while(true) {
            ticketPool.reTicket();
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
